package grg.learn.demoframework

import android.content.Context
import android.content.Intent
import android.graphics.RectF
import android.os.Bundle
import android.util.Log
import android.view.TouchDelegate
import android.view.View
import androidx.activity.ComponentActivity
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Rect

class LayoutDynamicLayoutIdActivity : ComponentActivity() {

    companion object {

        operator fun invoke(context: Context, layoutId: Int) {
            val intent = Intent(context, LayoutDynamicLayoutIdActivity::class.java)
            intent.putExtra("layoutid", layoutId)
            context.startActivity(intent)
        }

    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val layoutId = intent.getIntExtra("layoutid", 0)
        if (layoutId == 0) return

        setContentView(layoutId)

    }

}